#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H

#include <exception>
#include <QString>

class Non_Existent_Geometry
{
public:
    QString what() const throw()
    {
        return "The Geometry doesn't exists";
    }
};

class Serializer_exception
{
public:
    Serializer_exception(const QString &w) : _what(w) {}

    virtual QString what() const throw()
    {
        return _what;
    }
private:
    QString _what;
};

class Serializer_read_exception : public Serializer_exception
{
public:
    Serializer_read_exception(const QString &w) : Serializer_exception(w) {}
};

class Serializer_write_exception : public Serializer_exception
{
public:
    Serializer_write_exception(const QString &w) : Serializer_exception(w) {}
};


#endif // EXCEPTIONS_H
